package com.tkp.service.component;

import com.tkp.entity.User;
import com.tkp.service.IUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Author: duk
 * @Date: 2021/11/26 22:13
 * @Description: 人员接口代理操作
 */
@Component
@Slf4j
@Valid
public class UserComponent {

    public void userService(@NotNull IUserService userService){
        User user = new User();
        user.setUserCode("admin");
        user.setUserName("admin");
        List<User> userList = userService.selectUser(user);
        log.info("处理了接口返回结果集-->" + userList.size());
    }
}
